package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ProjectReviewEntityMapper;
import com.ly.heart.domain.ProjectReviewEntity;
import com.ly.heart.service.IProjectReviewEntityService;

/**
 * 隐患整改及复查Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectReviewEntityServiceImpl implements IProjectReviewEntityService
{
    @Autowired
    private ProjectReviewEntityMapper projectReviewEntityMapper;

    /**
     * 查询隐患整改及复查
     *
     * @param id 隐患整改及复查主键
     * @return 隐患整改及复查
     */
    @Override
    public ProjectReviewEntity selectProjectReviewEntityById(String id)
    {
        return projectReviewEntityMapper.selectProjectReviewEntityById(id);
    }

    /**
     * 查询隐患整改及复查列表
     *
     * @param projectReviewEntity 隐患整改及复查
     * @return 隐患整改及复查
     */
    @Override
    public List<ProjectReviewEntity> selectProjectReviewEntityList(ProjectReviewEntity projectReviewEntity)
    {
        return projectReviewEntityMapper.selectProjectReviewEntityList(projectReviewEntity);
    }

    /**
     * 新增隐患整改及复查
     *
     * @param projectReviewEntity 隐患整改及复查
     * @return 结果
     */
    @Override
    public int insertProjectReviewEntity(ProjectReviewEntity projectReviewEntity)
    {
        projectReviewEntity.setCreateTime(DateUtils.getNowDate());
        return projectReviewEntityMapper.insertProjectReviewEntity(projectReviewEntity);
    }

    /**
     * 修改隐患整改及复查
     *
     * @param projectReviewEntity 隐患整改及复查
     * @return 结果
     */
    @Override
    public int updateProjectReviewEntity(ProjectReviewEntity projectReviewEntity)
    {
        return projectReviewEntityMapper.updateProjectReviewEntity(projectReviewEntity);
    }

    /**
     * 批量删除隐患整改及复查
     *
     * @param ids 需要删除的隐患整改及复查主键
     * @return 结果
     */
    @Override
    public int deleteProjectReviewEntityByIds(String[] ids)
    {
        return projectReviewEntityMapper.deleteProjectReviewEntityByIds(ids);
    }

    /**
     * 删除隐患整改及复查信息
     *
     * @param id 隐患整改及复查主键
     * @return 结果
     */
    @Override
    public int deleteProjectReviewEntityById(String id)
    {
        return projectReviewEntityMapper.deleteProjectReviewEntityById(id);
    }
}
